﻿<UserControl x:Class="ContactTracing.CaseView.Controls.ImportFromLab"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:own="clr-namespace:ContactTracing.CaseView"
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="1000">
    <Grid>
        <DockPanel Grid.RowSpan="100" Background="#88000000" x:Name="panelBackground">

            <DockPanel HorizontalAlignment="Center" VerticalAlignment="Center" Height="440" Width="700">
                <Border BorderBrush="Gray" CornerRadius="16" Background="White">
                    <StackPanel>

                        <TextBlock Margin="10, 20, 40, 20" FontSize="32" FontWeight="Light">Import data file from lab</TextBlock>

                        <StackPanel Margin="10, 0, 10, 20">
                            <TextBlock FontSize="14">File location:</TextBlock>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <TextBox x:Name="txtFileName" FontSize="14" AcceptsReturn="False"  AcceptsTab="False" IsReadOnly="True" Grid.Column="0"></TextBox>
                                <Button x:Name="btnBrowse" Grid.Column="1" Height="28" Width="70" Margin="6, 0, 0, 0" Click="btnBrowse_Click">Browse</Button>
                            </Grid>

                            <DockPanel Height="20" />

                            <TextBlock FontSize="14">Import Progress:</TextBlock>
                            <ProgressBar x:Name="progressBar" Height="28" Maximum="100" Value="0">
                                <ProgressBar.Resources>
                                    <Style TargetType="{x:Type ProgressBar}">
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Value}" Value="100">
                                                <Setter Property="Visibility" Value="Hidden"/>
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </ProgressBar.Resources>
                            </ProgressBar>
                        </StackPanel>

                        <UniformGrid Rows="1" Columns="4" Width="680" Height="28" Margin="0, 5, 0, 0" HorizontalAlignment="Center">
                            <TextBlock Grid.Row="0" Grid.Column="0"></TextBlock>
                            <TextBlock Grid.Row="0" Grid.Column="1"></TextBlock>
                            <Button Grid.Row="0" Grid.Column="2" Margin="0, 0, 5, 0" x:Name="btnImport" Click="btnImport_Click">Import</Button>
                            <Button Grid.Row="0" Grid.Column="3" Margin="5, 0, 0, 0" x:Name="btnClose" Click="btnClose_Click">Close</Button>
                        </UniformGrid>

                    </StackPanel>
                </Border>
            </DockPanel>
        </DockPanel>
    </Grid>
</UserControl>
